package io.renren.dao;

import io.renren.common.dao.BaseDao;
import io.renren.entity.CarserviceitemsdEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * ${comments}
 *
 * @author Sen 524227263@qq.com
 * @since 1.0.0 2024-05-30
 */
@Mapper
public interface CarserviceitemsdDao extends BaseDao<CarserviceitemsdEntity> {

    @Select("select b.Name,b.Name as projectName,(a.transactCost + a.originalAgencyCost) as BusinessAmount,(a.transactCost + a.agencyCost) as Amount from Carserviceitemsd a " +
            "left join ProjectM b ON  a.ProjectM_FK = b.ProjectMOID " +
            "where AutoServiceM_FK =#{autoServiceMoId}")
    List<Map<String, Object>> getprojectList(@Param("autoServiceMoId") String autoServiceMoId);
}